import { createRouter, createWebHistory } from 'vue-router';
import CloudInventorySystem from '@/components/CloudInventorySystem.vue';
import HelloWorld from '@/components/HelloWorld.vue';
import PurchaseOrders from '@/components/purchases/PurchaseOrders.vue';
import ShoppingLists from '@/components/purchases/ShoppingLists';
import PurchaseReturnOrder from '@/components/purchases/PurchaseReturnOrder';
import SmartReplenishment from '@/components/purchases/SmartReplenishment';
import PurchaseInvoiceRegistration from '@/components/purchases/PurchaseInvoiceRegistration';
import PurchaseHistoryPriceTracking from '@/components/purchases/PurchaseHistoryPriceTracking';
import InquiryForm from '@/components/purchases/InquiryForm'
import PurchaseOrderTrackingForm from '@/components/purchases/PurchaseOrderTrackingForm'
import CommodityPurchaseSchedule from '@/components/purchases/CommodityPurchaseSchedule'
import PurchasePaymentOverview from '@/components/purchases/PurchasePaymentOverview'
import PurchaseOrderChangeRequest from '@/components/purchases/PurchaseOrderChangeRequest'
import PriceComparisonList from '@/components/purchases/PriceComparisonList'
import FinancialReceipts from '@/components/financial/FinancialReceipts'
import AdvanceCollections from '@/components/financial/AdvanceCollections'
import PaymentSlips from '@/components/financial/PaymentSlips'
import WriteOffDocument from '@/components/financial/WriteOffDocument'
import OtherIncomeSlips from '@/components/financial/OtherIncomeSlips'
import OtherExpenditureNotes from '@/components/financial/OtherExpenditureNotes'
import ListOfProcurementAndSalesCosts from '@/components/financial/ListOfProcurementAndSalesCosts'
import FundsTransferSlip from '@/components/financial/FundsTransferSlip'
import OnlinePayoutDetails from '@/components/financial/OnlinePayoutDetails'
import CashBankStatements from '@/components/financial/CashBankStatements'
import AccountsPayableSchedule from '@/components/financial/AccountsPayableSchedule'
import AccountsReceivableStatement from '@/components/financial/AccountsReceivableStatement'
import AccountsPayableSummaryStatement from '@/components/financial/AccountsPayableSummaryStatement'
import AccountsReceivableSummaryTable from '@/components/financial/AccountsReceivableSummaryTable'
import CustomerReconciliationTable from '@/components/financial/CustomerReconciliationTable'
import SupplierReconciliationSheet from '@/components/financial/SupplierReconciliationSheet'
import StatementOfOtherIncomeAndExpenditures from '@/components/financial/StatementOfOtherIncomeAndExpenditures'
import IncomeStatement from '@/components/financial/IncomeStatement'


//销货
import SalesOrders from '@/components/sales（销货）/SalesOrders.vue';
import SaleQuotation from '@/components/sales（销货）/SaleQuotation.vue';
import SalesOrder from '@/components/sales（销货）/SalesOrder.vue';
import SalesReturnOrder from '@/components/sales（销货）/SalesReturnOrder.vue';
import SalesInvoiceRegistration from '@/components/sales（销货）/SalesInvoiceRegistration.vue';
import LogisticsServices from '@/components/sales（销货）/LogisticsServices.vue';
import SalesDetails from '@/components/sales（销货）/SalesDetails.vue';
import ListOfSalesReceipts from '@/components/sales（销货）/ListOfSalesReceipts.vue';
import SalesOrderByPage from '@/components/sales（销货）/SalesOrderByPage.vue';
import SaleQuotationByPage from '@/components/sales（销货）/SaleQuotationByPage.vue';
import SalesOrdersByPage from '@/components/sales（销货）/SalesOrdersByPage.vue';
import SalesReturnOrderByPage from '@/components/sales（销货）/SalesReturnOrderByPage.vue';
import LogisticsServiceByPage from '@/components/sales（销货）/LogisticsServiceByPage.vue';



//商品
import GoodsManagement from '@/components/product/GoodsManagement'
import UnitManagement from '@/components/product/UnitManagement'
import CategoryManagement from '@/components/product/CategoryManagement.vue'
import BrandManagement from '@/components/product/BrandManagement'
import ShelfManagement from '@/components/product/ShelfManagement'
import CustomerMaterial from '@/components/product/CustomerMaterial'


//基本资料
import AccountManagement from '@/components/information/AccountManagement.vue'
import ExpenseType from '@/components/information/ExpenseType.vue'
import IncomeType from '@/components/information/IncomeType'
import PayMethod from '@/components/information/PayMethod'
import CodeRules from '@/components/information/CodeRules'
import FileCenter from '@/components/information/FileCenter'
import MissionCenter from '@/components/information/MissionCenter'
import DataLine from '@/components/information/DataLine'
import ProjectStatus from '@/components/information/ProjectStatus'
import VendorS from '@/components/information/VendorS.vue';
import VendorClassification from '@/components/information/VendorClassification.vue';
import ShippingAddress from '@/components/information/ShippingAddress.vue';
import PurchaseOrderList from '@/components/purchases/list/PurchaseOrderList'
import PurchaseList from '@/components/purchases/list/PurchaseList'
import PurchaseReturnOrderList from '@/components/purchases/list/PurchaseReturnOrderList'
import InvoiceRegisterList from '@/components/purchases/list/PurchaseInvoiceRegisterList'

import RegionS from '@/components/information/RegionS.vue';
import EmployeeS from '@/components/information/EmployeeS.vue';
import CustomerCategories from '@/components/information/CustomerCategories.vue';
import CustomerManagement from '@/components/information/CustomerManagement.vue';
import CustomerLevelTable from '@/components/information/CustomerLevelTable.vue';
import DepartmentManagement from '@/components/information/DepartmentManagement.vue';
import ProjectList from '@/components/information/ProjectList.vue';
import WarehouseManagement from '@/components/information/WarehouseManagement.vue';






//系统设置
import BasicParams from '@/components/SystemSettings/BasicParams.vue';



//仓库
import AmountAdjustPage from '@/components/ware/AmountAdjustPage.vue';
import AssemblyStoragePage from '@/components/ware/AssemblyStoragePage.vue';
import CombinationTemplate from '@/components/ware/CombinationTemplate.vue';
import DismantlingSheet from '@/components/ware/DismantlingSheet.vue';
import OtherInbound from '@/components/ware/OtherInbound.vue';
import OtherInputHistory from '@/components/ware/OtherInputHistory.vue';
import OtherOutbound from '@/components/ware/OtherOutbound.vue';
import TransferOrder from '@/components/ware/TransferOrder.vue';
import TransferOrderList from '@/components/ware/TransferOrderList.vue';



const routes = [
    {
        path: '/',
        component: CloudInventorySystem,
        children: [
            {
                path: '',
                name: 'Home',
                component: HelloWorld,
            },
            {
                path: 'regist',
                name: 'Regist',
                component: Regist,//注册
            },
            {
                path: 'information/',//资料

                children: [
                    {
                        path: 'accountManagement',
                        name: 'AccountManagement',
                        component: AccountManagement
                    },
                    {
                        path: 'expenseType',
                        name: "ExpenseType",
                        component: ExpenseType
                    },
                    {
                        path: 'incomeType',
                        name: "IncomeType",
                        component: IncomeType
                    },
                    {
                        path: "payMethod",
                        name: "PayMethod",
                        component: PayMethod
                    },
                    {
                        path: "codeRules",
                        name: "CodeRules",
                        component: CodeRules
                    },
                    {
                        path: "fileCenter",
                        name: "FileCenter",
                        component: FileCenter //文件中心
                    },
                    {
                        path: "missionCenter",
                        name: "MissionCenter",
                        component: MissionCenter //任务中心
                    },
                    {
                        path: "dataLine",
                        name: "DataLine",
                        component: DataLine //线路
                    },
                    {
                        path: "projectStatus",
                        name: "ProjectStatus",
                        component: ProjectStatus //项目状态
                    },
                    {
                        path: "vendorS",//供应商
                        name: "VendorS",
                        component: VendorS
                    },

                    {
                        path: "vendorClassification",//供应商分类
                        name: "VendorClassification",
                        component: VendorClassification
                    },

                    {
                        path: "shippingAddress",//发获地址
                        name: "ShippingAddress",
                        component: ShippingAddress
                    },
                    {
                        path: "regionS",//地区
                        name: "RegionS",
                        component: RegionS
                    },
                    {
                        path: "employeeS",//职员
                        name: "EmployeeS",
                        component: EmployeeS
                    },
                    {
                        path: "customerCategories",//客户类别
                        name: "CustomerCategories",
                        component: CustomerCategories
                    },
                    {
                        path: 'CustomerManagement',
                        name: 'CustomerManagement',
                        component: CustomerManagement
                    }, {
                        path: 'WarehouseManagement',
                        name: 'WarehouseManagement',
                        component: WarehouseManagement
                    }, {
                        path: 'CustomerLevelTable',
                        name: 'CustomerLevelTable',
                        component: CustomerLevelTable
                    }, {
                        path: 'ProjectList',
                        name: 'ProjectList',
                        component: ProjectList
                    }, {
                        path: 'DepartmentManagement',
                        name: 'DepartmentManagement',
                        component: DepartmentManagement
                    },





                ]
            },
            {
                path: 'settings/',
                children: [
                    {
                        path: "basicParams",//系统设置
                        name: "BasicParams",
                        component: BasicParams
                    }
                ]
            },
            {
                path: 'product/',
                children: [
                    {
                        path: 'goodsManagement',
                        name: 'GoodsManagement',
                        component: GoodsManagement,//商品管理
                    },
                    {
                        path: 'unitManagement',
                        name: 'UnitManagement',
                        component: UnitManagement,//计量单位
                    },
                    {
                        path: 'categoryManagement',
                        name: 'CategoryManagement',
                        component: CategoryManagement//类别
                    },
                    {
                        path: 'brandManagement',
                        name: 'BrandManagement',
                        component: BrandManagement//品牌
                    },
                    {
                        path: 'shelfManagement',
                        name: 'ShelfManagement',
                        component: ShelfManagement
                    },
                    {
                        path: 'customerMaterial',
                        name: 'CustomerMaterial',
                        component: CustomerMaterial
                    }
                ]
            },
            {
                path: 'ware/',
                children: [
                    {
                        path: 'TransferOrder',
                        name: 'TransferOrder',
                        component: TransferOrder
                    },
                    {
                        path: 'OtherInbound',
                        name: 'OtherInbound',
                        component: OtherInbound
                    }, {
                        path: 'OtherOutbound',
                        name: 'OtherOutbound',
                        component: OtherOutbound
                    },
                    {
                        path: 'AmountAdjustPage',
                        name: 'AmountAdjustPage',
                        component: AmountAdjustPage
                    }, {
                        path: 'AssemblyStoragePage',
                        name: 'AssemblyStoragePage',
                        component: AssemblyStoragePage
                    }, {
                        path: 'DismantlingSheet',
                        name: 'DismantlingSheet',
                        component: DismantlingSheet
                    }, {
                        path: 'CombinationTemplate',
                        name: 'CombinationTemplate',
                        component: CombinationTemplate
                    }, {
                        path: 'TransferOrderList',
                        name: 'TransferOrderList',
                        component: TransferOrderList,
                        meta: { title: '调拨历史单据' }
                    }, {
                        path: 'OtherInputHistory',
                        name: 'OtherInputHistory',
                        component: OtherInputHistory
                    },
                ]
            },
            {
                path: 'purchases/',
                children: [
                    {
                        path: 'purchaseOrders',
                        name: 'PurchaseOrders',
                        component: PurchaseOrders,//购物订单
                    },
                    {
                        path: 'shoppingLists',
                        name: 'ShoppingLists',
                        component: ShoppingLists,//购物单
                    },
                    {
                        path: 'purchaseReturnOrder',
                        name: 'PurchaseReturnOrder',
                        component: PurchaseReturnOrder,//购物退货单
                    },
                    {
                        path: 'smartReplenishment',
                        name: 'SmartReplenishment',
                        component: SmartReplenishment,//智能补货
                    },
                    {
                        path: 'purchaseInvoiceRegistration',
                        name: 'PurchaseInvoiceRegistration',
                        component: PurchaseInvoiceRegistration,//采购发票登记
                    },
                    {
                        path: 'purchaseHistoryPriceTracking',
                        name: 'PurchaseHistoryPriceTracking',
                        component: PurchaseHistoryPriceTracking,//采购历史价跟踪
                    },
                    {
                        path: 'inquiryForm',
                        name: 'InquiryForm',
                        component: InquiryForm,//询价单
                    },
                    {
                        path: 'purchaseOrderTrackingForm',
                        name: 'PurchaseOrderTrackingForm',
                        component: PurchaseOrderTrackingForm,//采购订单跟踪表
                    },
                    {
                        path: 'commodityPurchaseSchedule',
                        name: 'CommodityPurchaseSchedule',
                        component: CommodityPurchaseSchedule,//商品采购明细表
                    },
                    {
                        path: 'purchasePaymentOverview',
                        name: 'PurchasePaymentOverview',
                        component: PurchasePaymentOverview,//采购付款一览表
                    },
                    {
                        path: 'purchaseOrderChangeRequest',
                        name: 'PurchaseOrderChangeRequest',
                        component: PurchaseOrderChangeRequest,//采购订单变更表
                    },
                    {
                        path : 'purchaseOrderList',
                        name: 'PurchaseOrderList',
                        component: PurchaseOrderList
                    },
                    {
                        path:'purchaseList',
                        name: 'PurchaseList',
                        component: PurchaseList
                    },
                    {
                        path:'purchaseReturnOrderList',
                        name: 'PurchaseReturnOrderList',
                        component: PurchaseReturnOrderList
                    },
                    {
                        path:'invoiceRegisterList',
                        name: 'InvoiceRegisterList',
                        component: InvoiceRegisterList
                    },
                ]
            },
            // 销售部分...
            {
                path: 'salesOrders',
                name: "saleOrders",
                component: SalesOrders
            },

            {
                path: "saleQuotation",
                name: "saleQuotation",
                component: SaleQuotation
            },

            {
                path: 'salesOrder',
                name: "salesOrder",
                component: SalesOrder
            },

            {
                path: 'salesReturnOrder',
                name: "salesReturnOrder",
                component: SalesReturnOrder
            },
            {

                path: 'salesInvoiceRegistration',
                name: "salesInvoiceRegistration",
                component: SalesInvoiceRegistration
            },
            {
                path: 'logisticsServices',
                name: "logisticsServices",
                component: LogisticsServices
            },
            {
                path: 'salesDetails',
                name: "salesDetails",
                component: SalesDetails
            },
            {
                path: 'listOfSalesReceipts',
                name: "listOfSalesReceipts",
                component: ListOfSalesReceipts

            },
            {
                path: 'saleQuotationByPage',
                name: "报价单记录",
                component: SaleQuotationByPage
            },
            {
                path: 'salesOrderByPage',
                name: "销货单记录",
                component: SalesOrderByPage
            },
            {
                path: 'salesOrdersByPage',
                name: "销货订单记录",
                component: SalesOrdersByPage
            },
            {
                path: 'salesReturnOrderByPage',
                name: "销货退货单记录",
                component: SalesReturnOrderByPage
            },
            {
                path: 'logisticsServiceByPage',
                name: "物流服务记录",
                component: LogisticsServiceByPage
            },

            {
                path: 'purchases/',//购货
                children: [
                    {
                        path: 'purchaseOrders',
                        name: 'PurchaseOrders',
                        component: PurchaseOrders,//购物订单
                    },
                    {
                        path: 'shoppingLists',
                        name: 'ShoppingLists',
                        component: ShoppingLists,//购物单
                    },
                    {
                        path: 'purchaseReturnOrder',
                        name: 'PurchaseReturnOrder',
                        component: PurchaseReturnOrder,//购物退货单
                    },
                    {
                        path: 'smartReplenishment',
                        name: 'SmartReplenishment',
                        component: SmartReplenishment,//智能补货
                    },
                    {
                        path: 'purchaseInvoiceRegistration',
                        name: 'PurchaseInvoiceRegistration',
                        component: PurchaseInvoiceRegistration,//采购发票登记
                    },
                    {
                        path: 'purchaseHistoryPriceTracking',
                        name: 'PurchaseHistoryPriceTracking',
                        component: PurchaseHistoryPriceTracking,//采购历史价跟踪
                    },
                    {
                        path: 'inquiryForm',
                        name: 'InquiryForm',
                        component: InquiryForm,//询价单
                    },
                    {
                        path: 'priceComparisonList',
                        name: 'PriceComparisonList',
                        component: PriceComparisonList,//比价单
                    },
                    {
                        path: 'purchaseOrderTrackingForm',
                        name: 'PurchaseOrderTrackingForm',
                        component: PurchaseOrderTrackingForm,//采购订单跟踪表
                    },
                    {
                        path: 'commodityPurchaseSchedule',
                        name: 'CommodityPurchaseSchedule',
                        component: CommodityPurchaseSchedule,//商品采购明细表
                    },
                    {
                        path: 'purchasePaymentOverview',
                        name: 'PurchasePaymentOverview',
                        component: PurchasePaymentOverview,//采购付款一览表
                    },
                    {
                        path: 'purchaseOrderChangeRequest',
                        name: 'PurchaseOrderChangeRequest',
                        component: PurchaseOrderChangeRequest,//采购订单变更表
                    },
                ]
            },
            {
                path: 'financial/',//资金
                children: [
                    {
                        path: 'financialReceipts',
                        name: 'FinancialReceipts',
                        component: FinancialReceipts,//收款单
                    },
                    {
                        path: 'advanceCollections',
                        name: 'AdvanceCollections',
                        component: AdvanceCollections,//预收款单
                    },
                    {
                        path: 'paymentSlips',
                        name: 'PaymentSlips',
                        component: PaymentSlips,//付款单
                    },
                    {
                        path: 'writeOffDocument',
                        name: 'WriteOffDocument',
                        component: WriteOffDocument,//核销单
                    },
                    {
                        path: 'otherIncomeSlips',
                        name: 'OtherIncomeSlips',
                        component: OtherIncomeSlips,//其他收入单
                    },
                    {
                        path: 'otherExpenditureNotes',
                        name: 'OtherExpenditureNotes',
                        component: OtherExpenditureNotes,//其他支出单
                    },
                    {
                        path: 'listOfProcurementAndSalesCosts',
                        name: 'ListOfProcurementAndSalesCosts',
                        component: ListOfProcurementAndSalesCosts,//采购销售费用清单
                    },
                    {
                        path: 'fundsTransferSlip',
                        name: 'FundsTransferSlip',
                        component: FundsTransferSlip,//资金转账单
                    },
                    {
                        path: 'onlinePayoutDetails',
                        name: 'OnlinePayoutDetails',
                        component: OnlinePayoutDetails,//在线收款明细
                    },
                    {
                        path: 'cashBankStatements',
                        name: 'CashBankStatements',
                        component: CashBankStatements,//现金银行报表
                    },
                    {
                        path: 'accountsPayableSchedule',
                        name: 'AccountsPayableSchedule',
                        component: AccountsPayableSchedule,//应付账款明细表
                    },
                    {
                        path: 'accountsReceivableStatement',
                        name: 'AccountsReceivableStatement',
                        component: AccountsReceivableStatement,//应收账款明细表
                    },
                    {
                        path: 'accountsPayableSummaryStatement',
                        name: 'AccountsPayableSummaryStatement',
                        component: AccountsPayableSummaryStatement,//应付账款汇总表
                    },
                    {
                        path: 'accountsReceivableSummaryTable',
                        name: 'AccountsReceivableSummaryTable',
                        component: AccountsReceivableSummaryTable,//应收账款汇总表
                    },
                    {
                        path: 'customerReconciliationTable',
                        name: 'CustomerReconciliationTable',
                        component: CustomerReconciliationTable,//客户对账表
                    },
                    {
                        path: 'supplierReconciliationSheet',
                        name: 'SupplierReconciliationSheet',
                        component: SupplierReconciliationSheet,//供应商对账表
                    },
                    {
                        path: 'statementOfOtherIncomeAndExpenditures',
                        name: 'StatementOfOtherIncomeAndExpenditures',
                        component: StatementOfOtherIncomeAndExpenditures,//其他收支明细表
                    },
                    {
                        path: 'incomeStatement',
                        name: 'IncomeStatement',
                        component: IncomeStatement,//利润表
                    },
                ]
            }



            // 其他子路由...
        ],
    },
    {
        path: '/regist',
        name: 'Regist',
        component: Regist,//注册
    },
    {
        path: '/login',
        name: 'LoginPage',
        component: LoginPage
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;